<%@ page language="java" pageEncoding="UTF-8" %>
<%@ include file="../portal_common/taglibs.jsp" %>
<!DOCTYPE html>
<html>

<head>
    <meta charset="utf-8"/>
    <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7"/>
    <title>产品列表页</title>
    <link rel="icon" href="${ctx}/assets/img/favicon.ico">

    <link rel="stylesheet" type="text/css" href="${ctx}/css/webbase.css"/>
    <link rel="stylesheet" type="text/css" href="${ctx}/css/pages-list.css"/>
    <link rel="stylesheet" type="text/css" href="${ctx}/css/widget-cartPanelView.css"/>

    <script>
        var path =  ${pageContext.request.contextPath};
    </script>
    <script type="text/javascript" src="${ctx}/plugins/angularjs/angular.min.js"></script>
    <script type="text/javascript" src="${ctx}/js/base.js"></script>
    <script type="text/javascript" src="${ctx}/js/service/searchService.js"></script>
    <script type="text/javascript" src="${ctx}/js/controller/searchController.js"></script>
</head>

<body ng-app="pinyougou" ng-controller="searchController" ng-init="loadkeywords();searchMap.keywords='${keywords}'">
<!-- 头部栏位 -->
<!--页面顶部-->
<div id="nav-bottom">
    <!--顶部-->
    <div class="nav-top">
        <%@include file="../portal_common/top.jsp" %>

        <!--头部-->
        <div class="header">
            <div class="py-container">
                <div class="yui3-g Logo">
                    <div class="yui3-u Left logoArea">
                        <a class="logo-bd" title="瓷器商城" href="${ctx}/index" target="_blank"></a>
                    </div>
                    <div class="yui3-u Center searchArea">
                        <div class="search">
                            <form action="" class="sui-form form-inline">
                                <!--searchAutoComplete-->
                                <div class="input-append">
                                    <input type="text" id="autocomplete" ng-model="searchMap.keywords" type="text"
                                           class="input-error input-xxlarge"/>
                                    <button class="sui-btn btn-xlarge btn-danger" ng-click="searchMap.pageNo=1;search()"
                                            value="${keywords}" type="button">搜索
                                    </button>
                                </div>
                            </form>
                        </div>
                    </div>
                    <div class="yui3-u Right shopArea">
                        <div class="fr shopcar">
                            <div class="show-shopcar" id="shopcar">
                                <span class="car"></span>
                                <a class="sui-btn btn-default btn-xlarge" href="${ctx}/cart/home" target="_blank">
                                    <span>我的购物车</span>
                                    <i class="shopnum">?</i>
                                </a>
                                <div class="clearfix shopcarlist" id="shopcarlist" style="display:none">
                                    <p>"赶快去购物车结算喽"</p>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>

<!--list-content-->
<div class="main">
    <div class="py-container">
        <!--bread-->
        <div class="bread">
            <ul class="fl sui-breadcrumb">
                <li>
                    <a href="#">搜索条件：</a>
                </li>

            </ul>
            <ul class="tags-choose">
                <li class="tag" ng-if="searchMap.category!=''" ng-click="removeSearchItem('category')">
                    商品分类：{{searchMap.category}}<i class="sui-icon icon-tb-close"></i></li>
                <li class="tag" ng-if="searchMap.brand!=''" ng-click="removeSearchItem('brand')">
                    品牌：{{searchMap.brand}}<i class="sui-icon icon-tb-close"></i></li>
                <li class="tag" ng-repeat="(key,value) in searchMap.spec" ng-click="removeSearchItem(key)">
                    {{key}}：{{value}}<i class="sui-icon icon-tb-close"></i></li>
                <li class="tag" ng-if="searchMap.price!=''" ng-click="removeSearchItem('price')">
                    价格：{{searchMap.price}}<i class="sui-icon icon-tb-close"></i></li>

                搜索结果：{{resultMap.total}}条
            </ul>

            <div class="clearfix"></div>
        </div>
        <!--selector-->
        <div class="clearfix selector">
            <div class="type-wrap" ng-if="resultMap.categoryList!=null && searchMap.category=='' ">
                <div class="fl key">商品分类</div>
                <div class="fl value">
						<span ng-repeat="category in resultMap.categoryList">
						   <a href="#" ng-click="addSearchItem('category',category)">{{category}}</a>
						</span>
                </div>
                <div class="fl ext"></div>
            </div>
            <div class="type-wrap logo"
                 ng-if="resultMap.brandList!=null && searchMap.brand=='' && keywordsIsBrand()==false">
                <div class="fl key brand" style="padding-bottom: 30px;">品牌</div>
                <div class="value logos">
                    <ul class="logo-list">
                        <li ng-repeat="brand in resultMap.brandList">
                            <a href="#" ng-click="addSearchItem('brand',brand.text)">{{brand.text}}</a>
                        </li>
                    </ul>
                </div>
                <%--<div class="ext">
                    <a href="javascript:void(0);" class="sui-btn">多选</a>
                    <a href="javascript:void(0);">更多</a>
                </div>--%>
            </div>
            <div class="type-wrap" ng-repeat="spec in resultMap.specList" ng-if="searchMap.spec[spec.text]==null">
                <div class="fl key">{{spec.text}}</div>
                <div class="fl value">
                    <ul class="type-list">
                        <li ng-repeat="option in spec.options">
                            <a href="#" ng-click="addSearchItem(spec.text,option.optionName)">{{option.optionName}}</a>
                        </li>
                    </ul>
                </div>
                <div class="fl ext"></div>
            </div>

            <div class="type-wrap" ng-if="searchMap.price=='' ">
                <div class="fl key">价格</div>
                <div class="fl value">
                    <ul class="type-list">
                        <li>
                            <a href="#" ng-click="addSearchItem('price','0-200')">0-200元</a>
                        </li>
                        <li>
                            <a href="#" ng-click="addSearchItem('price','200-500')">200-500元</a>
                        </li>
                        <li>
                            <a href="#" ng-click="addSearchItem('price','500-1000')">500-1000元</a>
                        </li>
                        <li>
                            <a href="#" ng-click="addSearchItem('price','1000-1500')">1000-1500元</a>
                        </li>
                        <li>
                            <a href="#" ng-click="addSearchItem('price','1500-2000')">1500-2000元</a>
                        </li>
                        <li>
                            <a href="#" ng-click="addSearchItem('price','2000-3000')">2000-3000元 </a>
                        </li>
                        <li>
                            <a href="#" ng-click="addSearchItem('price','3000-*')">3000元以上</a>
                        </li>
                    </ul>
                </div>
                <div class="fl ext">
                </div>
            </div>
        </div>
        <!--details-->
        <div class="details">
            <div class="goods-list">
                <ul class="yui3-g">
                    <li class="yui3-u-1-5" ng-repeat="item in resultMap.rows">
                        <div class="list-wrap">
                            <div class="p-img">
                                <a href="${ctx}/itemSearch/details?goodsId={{item.goodsId}}" target="_blank"><img
                                        src="{{item.image}}"/></a>
                            </div>
                            <div class="price">
                                <strong>
                                    <em>¥</em>
                                    <i>{{item.price}}</i>
                                </strong>
                            </div>
                            <div class="attr" ng-bind-html="item.title | trustHtml">

                            </div>
                            <div class="cu">
                                <em></em>
                            </div>
                            <div class="commit">
                                <i class="command">已有2000人评价</i>
                            </div>
                            <div class="operate">
                                <a href="javascript:void(0);" ng-click="addCart(item.id)" class="sui-btn btn-bordered btn-danger">加入购物车</a>
                                <a href="javascript:void(0);" class="sui-btn btn-bordered">对比</a>
                                <a href="javascript:void(0);" class="sui-btn btn-bordered">关注</a>
                            </div>
                        </div>
                    </li>
                </ul>
            </div>
            <div class="fr page">
                <div class="sui-pagination pagination-large">
                    <ul>
                        <li class="prev {{isTopPage()?'disabled':''}}">
                            <a href="#" ng-click="queryByPage(searchMap.pageNo-1)">«</a>
                        </li>
                        <li class="dotted" ng-if="firstDot==true"><span>...</span></li>
                        <li ng-repeat="page in pageLabel">
                            <a href="#" ng-click="queryByPage(page)">{{page}}</a>
                        </li>
                        <li class="dotted" ng-if="lastDot==true"><span>...</span></li>
                        <li class="next {{isEndPage()?'disabled':''}}">
                            <a href="#" ng-click="queryByPage(searchMap.pageNo+1)">»</a>
                        </li>
                    </ul>
                    <div><span>共{{resultMap.totalPages}}页&nbsp;</span><span>
      到第
      <input type="text" class="page-num" ng-model="searchMap.pageNo">
      页 <button class="page-confirm" ng-click="queryByPage(searchMap.pageNo)">确定</button></span></div>
                </div>
            </div>
        </div>
        <!--hotsale-->
        <div class="clearfix hot-sale">
            <h4 class="title">热卖商品</h4>
            <div class="hot-list">
                <ul class="yui3-g">
                    <li class="yui3-u-1-4">
                        <div class="list-wrap">
                            <div class="p-img">
                                <img src="${ctx}/image/1-1_meitu_1.jpg"/>
                            </div>
                            <div class="attr">
                                <em>景德镇制</em>
                            </div>
                            <div class="price">
                                <strong>
                                    <em>¥</em>
                                    <i>4088.00</i>
                                </strong>
                            </div>
                            <div class="commit">
                                <i class="command">90009</i>
                            </div>
                        </div>
                    </li>
                    <li class="yui3-u-1-4">
                        <div class="list-wrap">
                            <div class="p-img">
                                <img src="${ctx}/image/2-1_meitu_3.jpg"/>
                            </div>
                            <div class="attr">
                                <em>景德镇制</em>
                            </div>
                            <div class="price">
                                <strong>
                                    <em>¥</em>
                                    <i>4088.00</i>
                                </strong>
                            </div>
                            <div class="commit">
                                <i class="command">已有700人评价</i>
                            </div>
                        </div>
                    </li>
                    <li class="yui3-u-1-4">
                        <div class="list-wrap">
                            <div class="p-img">
                                <img src="${ctx}/image/3-1_meitu_4.jpg"/>
                            </div>
                            <div class="attr">
                                <em>景德镇制</em>
                            </div>
                            <div class="price">
                                <strong>
                                    <em>¥</em>
                                    <i>4068.00</i>
                                </strong>
                            </div>
                            <div class="commit">
                                <i class="command">已有20人评价</i>
                            </div>
                        </div>
                    </li>
                    <li class="yui3-u-1-4">
                        <div class="list-wrap">
                            <div class="p-img">
                                <img src="${ctx}/image/4-1_meitu_5.jpg"/>
                            </div>
                            <div class="attr">
                                <em>景德镇制</em>
                            </div>
                            <div class="price">
                                <strong>
                                    <em>¥</em>
                                    <i>4088.00</i>
                                </strong>
                            </div>
                            <div class="commit">
                                <i class="command">已有1700人评价</i>
                            </div>
                        </div>
                    </li>
                </ul>
            </div>
        </div>
    </div>
</div>
<!-- 底部栏位 -->
<!--页面底部-->
<div class="clearfix footer">
    <div class="py-container">
        <div class="footlink">
            <div class="Mod-service">
                <ul class="Mod-Service-list">
                    <li class="grid-service-item intro  intro1">

                        <i class="serivce-item fl"></i>
                        <div class="service-text">
                            <h4>正品保障</h4>
                            <p>正品保障，提供发票</p>
                        </div>

                    </li>
                    <li class="grid-service-item  intro intro2">

                        <i class="serivce-item fl"></i>
                        <div class="service-text">
                            <h4>正品保障</h4>
                            <p>正品保障，提供发票</p>
                        </div>

                    </li>
                    <li class="grid-service-item intro  intro3">

                        <i class="serivce-item fl"></i>
                        <div class="service-text">
                            <h4>正品保障</h4>
                            <p>正品保障，提供发票</p>
                        </div>

                    </li>
                    <li class="grid-service-item  intro intro4">

                        <i class="serivce-item fl"></i>
                        <div class="service-text">
                            <h4>正品保障</h4>
                            <p>正品保障，提供发票</p>
                        </div>

                    </li>
                    <li class="grid-service-item intro intro5">

                        <i class="serivce-item fl"></i>
                        <div class="service-text">
                            <h4>正品保障</h4>
                            <p>正品保障，提供发票</p>
                        </div>

                    </li>
                </ul>
            </div>
            <div class="clearfix Mod-list">
                <div class="yui3-g">
                    <div class="yui3-u-1-6">
                        <h4>购物指南</h4>
                        <ul class="unstyled">
                            <li>购物流程</li>
                            <li>会员介绍</li>
                            <li>生活旅行/团购</li>
                            <li>常见问题</li>
                            <li>购物指南</li>
                        </ul>

                    </div>
                    <div class="yui3-u-1-6">
                        <h4>配送方式</h4>
                        <ul class="unstyled">
                            <li>上门自提</li>
                            <li>211限时达</li>
                            <li>配送服务查询</li>
                            <li>配送费收取标准</li>
                            <li>海外配送</li>
                        </ul>
                    </div>
                    <div class="yui3-u-1-6">
                        <h4>支付方式</h4>
                        <ul class="unstyled">
                            <li>货到付款</li>
                            <li>在线支付</li>
                            <li>分期付款</li>
                            <li>邮局汇款</li>
                            <li>公司转账</li>
                        </ul>
                    </div>
                    <div class="yui3-u-1-6">
                        <h4>售后服务</h4>
                        <ul class="unstyled">
                            <li>售后政策</li>
                            <li>价格保护</li>
                            <li>退款说明</li>
                            <li>返修/退换货</li>
                            <li>取消订单</li>
                        </ul>
                    </div>
                    <div class="yui3-u-1-6">
                        <h4>特色服务</h4>
                        <ul class="unstyled">
                            <li>夺宝岛</li>
                            <li>DIY装机</li>
                            <li>延保服务</li>
                            <li>瓷器商城E卡</li>
                            <li>瓷器商城通信</li>
                        </ul>
                    </div>
                    <div class="yui3-u-1-6">
                        <h4>帮助中心</h4>
                        <img src="${ctx}/img/wx_cz.jpg">
                    </div>
                </div>
            </div>
            <div class="Mod-copyright">
                <ul class="helpLink">
                    <li>关于我们<span class="space"></span></li>
                    <li>联系我们<span class="space"></span></li>
                    <li>关于我们<span class="space"></span></li>
                    <li>商家入驻<span class="space"></span></li>
                    <li>营销中心<span class="space"></span></li>
                    <li>友情链接<span class="space"></span></li>
                    <li>关于我们<span class="space"></span></li>
                    <li>营销中心<span class="space"></span></li>
                    <li>友情链接<span class="space"></span></li>
                    <li>关于我们</li>
                </ul>
                <p>地址：北京市昌平区建材城西路金燕龙办公楼一层 邮编：100096 电话：400-618-4000 传真：010-82935100</p>
                <p>京ICP备08001421号京公网安备110108007702</p>
            </div>
        </div>
    </div>
</div>
<!--页面底部END-->
<!--侧栏面板开始-->
<%--<div class="J-global-toolbar">
    <div class="toolbar-wrap J-wrap">
        <div class="toolbar">
            <div class="toolbar-panels J-panel">

                <!-- 购物车 -->
                <div style="visibility: hidden;" class="J-content toolbar-panel tbar-panel-cart toolbar-animate-out">
                    <h3 class="tbar-panel-header J-panel-header">
                        <a href="" class="title"><i></i><em class="title">购物车</em></a>
                        <span class="close-panel J-close" onclick="cartPanelView.tbar_panel_close('cart');"></span>
                    </h3>
                    <div class="tbar-panel-main">
                        <div class="tbar-panel-content J-panel-content">
                            <div id="J-cart-tips" class="tbar-tipbox hide">
                                <div class="tip-inner">
                                    <span class="tip-text">还没有登录，登录后商品将被保存</span>
                                    <a href="#none" class="tip-btn J-login">登录</a>
                                </div>
                            </div>
                            <div id="J-cart-render">
                                <!-- 列表 -->
                                <div id="cart-list" class="tbar-cart-list">
                                </div>
                            </div>
                        </div>
                    </div>
                    <!-- 小计 -->
                    <div id="cart-footer" class="tbar-panel-footer J-panel-footer">
                        <div class="tbar-checkout">
                            <div class="jtc-number"><strong class="J-count" id="cart-number">0</strong>件商品</div>
                            <div class="jtc-sum"> 共计：<strong class="J-total" id="cart-sum">¥0</strong></div>
                            <a class="jtc-btn J-btn" href="#none" target="_blank">去购物车结算</a>
                        </div>
                    </div>
                </div>

                <!-- 我的关注 -->
                <div style="visibility: hidden;" data-name="follow" class="J-content toolbar-panel tbar-panel-follow">
                    <h3 class="tbar-panel-header J-panel-header">
                        <a href="#" target="_blank" class="title"> <i></i> <em class="title">我的关注</em> </a>
                        <span class="close-panel J-close" onclick="cartPanelView.tbar_panel_close('follow');"></span>
                    </h3>
                    <div class="tbar-panel-main">
                        <div class="tbar-panel-content J-panel-content">
                            <div class="tbar-tipbox2">
                                <div class="tip-inner"><i class="i-loading"></i></div>
                            </div>
                        </div>
                    </div>
                    <div class="tbar-panel-footer J-panel-footer"></div>
                </div>

                <!-- 我的足迹 -->
                <div style="visibility: hidden;" class="J-content toolbar-panel tbar-panel-history toolbar-animate-in">
                    <h3 class="tbar-panel-header J-panel-header">
                        <a href="#" target="_blank" class="title"> <i></i> <em class="title">我的足迹</em> </a>
                        <span class="close-panel J-close" onclick="cartPanelView.tbar_panel_close('history');"></span>
                    </h3>
                    <div class="tbar-panel-main">
                        <div class="tbar-panel-content J-panel-content">
                            <div class="jt-history-wrap">
                                <ul>
                                    <!--<li class="jth-item">
                                    <a href="#" class="img-wrap"> <img src=".portal/img/like_03.png" height="100" width="100" /> </a>
                                    <a class="add-cart-button" href="#" target="_blank">加入购物车</a>
                                    <a href="#" target="_blank" class="price">￥498.00</a>
                                </li>
                                <li class="jth-item">
                                    <a href="#" class="img-wrap"> <img src="portal/img/like_02.png" height="100" width="100" /></a>
                                    <a class="add-cart-button" href="#" target="_blank">加入购物车</a>
                                    <a href="#" target="_blank" class="price">￥498.00</a>
                                </li>-->
                                </ul>
                                <a href="#" class="history-bottom-more" target="_blank">查看更多足迹商品 &gt;&gt;</a>
                            </div>
                        </div>
                    </div>
                    <div class="tbar-panel-footer J-panel-footer"></div>
                </div>

            </div>

            <div class="toolbar-header"></div>

            <!-- 侧栏按钮 -->
            <div class="toolbar-tabs J-tab">
                <div onclick="cartPanelView.tabItemClick('cart')" class="toolbar-tab tbar-tab-cart" data="购物车"
                     tag="cart">
                    <i class="tab-ico"></i>
                    <em class="tab-text"></em>
                    <span class="tab-sub J-count " id="tab-sub-cart-count">0</span>
                </div>
                <div onclick="cartPanelView.tabItemClick('follow')" class="toolbar-tab tbar-tab-follow" data="我的关注"
                     tag="follow">
                    <i class="tab-ico"></i>
                    <em class="tab-text"></em>
                    <span class="tab-sub J-count hide">0</span>
                </div>
                <div onclick="cartPanelView.tabItemClick('history')" class="toolbar-tab tbar-tab-history" data="我的足迹"
                     tag="history">
                    <i class="tab-ico"></i>
                    <em class="tab-text"></em>
                    <span class="tab-sub J-count hide">0</span>
                </div>
            </div>

            <div class="toolbar-footer">
                <div class="toolbar-tab tbar-tab-top">
                    <a href="#"> <i class="tab-ico  "></i> <em class="footer-tab-text">顶部</em> </a>
                </div>
                <div class="toolbar-tab tbar-tab-feedback">
                    <a href="#" target="_blank"> <i class="tab-ico"></i> <em class="footer-tab-text ">反馈</em> </a>
                </div>
            </div>

            <div class="toolbar-mini"></div>

        </div>

        <div id="J-toolbar-load-hook"></div>

    </div>
</div>--%>
<!--购物车单元格 模板-->
<script type="text/template" id="tbar-cart-item-template">
    <div class="tbar-cart-item">
        <div class="jtc-item-promo">
            <em class="promo-tag promo-mz">满赠<i class="arrow"></i></em>
            <div class="promo-text">已购满600元，您可领赠品</div>
        </div>
        <div class="jtc-item-goods">
            <span class="p-img"><a href="#" target="_blank"><img src="{2}" alt="{1}" height="50" width="50"/></a></span>
            <div class="p-name">
                <a href="#">{1}</a>
            </div>
            <div class="p-price"><strong>¥{3}</strong>×{4}</div>
            <a href="#none" class="p-del J-del">删除</a>
        </div>
    </div>
</script>
<!--侧栏面板结束-->
<script type="text/javascript" src="${ctx}/js/plugins/jquery/jquery.min.js"></script>
<script type="text/javascript">
    $(function () {
        $("#service").hover(function () {
            $(".service").show();
        }, function () {
            $(".service").hide();
        });
        $("#shopcar").hover(function () {
            $("#shopcarlist").show();
        }, function () {
            $("#shopcarlist").hide();
        });

    })
</script>
<script type="text/javascript" src="${ctx}/js/model/cartModel.js"></script>
<script type="text/javascript" src="${ctx}/js/czFunction.js"></script>
<script type="text/javascript" src="${ctx}/js/plugins/jquery.easing/jquery.easing.min.js"></script>
<script type="text/javascript" src="${ctx}/js/plugins/sui/sui.min.js"></script>
<script type="text/javascript" src="${ctx}/js/widget/cartPanelView.js"></script>
</body>

</html>